package com.ldy.frame;

/**
 * Created by MacBook Pro on 2017/12/5.
 */
import java.awt.BorderLayout;

import javax.swing.*;
import javax.swing.border.EmptyBorder;

import com.sun.jna.NativeLibrary;
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent;
import uk.co.caprica.vlcj.player.embedded.EmbeddedMediaPlayer;
import uk.co.caprica.vlcj.runtime.RuntimeUtil;

public class View extends JPanel{


    //private JPanel contentPane;
    private EmbeddedMediaPlayerComponent mediaPlayerComponent;
    /*
    public View()
    {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(500,500,500,500);
        contentPane =new JPanel();
        contentPane.setBorder(new EmptyBorder(20,20,20,20));
        setContentPane(contentPane);
        contentPane.setLayout(new BorderLayout(0,0));
        JPanel player =new JPanel();
        contentPane.add(player,BorderLayout.CENTER);
        player.setLayout(new BorderLayout(0,0));
        mediaPlayerComponent =new EmbeddedMediaPlayerComponent();
        player.add(mediaPlayerComponent);
        */
    public View()
    {
        this.setBorder(new EmptyBorder(20,20,20,20));
        this.setLayout(new BorderLayout(0,0));
        JPanel player =new JPanel();
        this.add(player,BorderLayout.CENTER);
        player.setLayout(new BorderLayout(0,0));
        mediaPlayerComponent =new EmbeddedMediaPlayerComponent();
        player.add(mediaPlayerComponent);
    }

    public EmbeddedMediaPlayer getMediaPlayer()
    {
        return mediaPlayerComponent.getMediaPlayer();
    }
}
